package com.maysham.coder.server.config.auth;

import com.maysham.coder.server.model.User;
import org.springframework.security.core.context.SecurityContextHolder;

public class SecurityUtil {

    public static User current(){
        return (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
